{% extends'base.html' %}
{% block content %}
	<form class="input-group" action="add" method="post">
{#		<input class="form-control" id="content" name="content" type="text" placeholder="content">#}
			{{ form.hidden_tag() }}
			{{ form.content(class='form-control',placeholder="content") }}
		<span class="input-group-btn">
			<button class="btn-default" type="submit">Add</button>
		</span>
	</form>
	{% for error in form.errors.content %}
		<div>{{ error }}</div>
	{% endfor %}
	<div>
		<h2>Todo List</h2>
			<table class="table">
				<thead>
				<tr>
					<th>content</th>
					<th>status</th>
					<th>time</th>
				</tr>
				</thead>
				<tbody>
				{% for todo in todos %}
					<tr>
						<td>{{ todo.content }}</td>
						<td>
							{% if todo.status==1 %}
							已完成
							{% else %}
							未完成
							{% endif %}
						</td>
						<td>{{ todo.time }}</td>
					</tr>
				{% endfor %}
				</tbody>
			</table>
	</div>
{% endblock %}